<?php
require_once('controller/auth.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
<title>TMIS-Training Module</title>

<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="https://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<!-- Le styles -->
<link rel="stylesheet" href="assets/css/bootstrap.css" type="text/css" />
<link rel="stylesheet" href="assets/css/bootstrap-responsive.css" type="text/css" />
<link rel="stylesheet" href="assets/css/font-awesome.css" type="text/css" />
<script type="text/javascript" src="assets/js/jquery.min.js"></script>

<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/bootstrap-popover.js"></script>
<script type="text/javascript" src="assets/js/bootstrap-tooltip.js"></script>
<script>
$(function ()
{ 
$("input").popover({trigger: 'focus', 'placement':'right'});

$("textarea").popover({trigger: 'focus'});


$('#tab').tooltip({'placement':'right', 'trigger' : 'hover'});

$('a').tooltip({'placement':'bottom', 'trigger' : 'hover'});	
});
</script>
<!-- Le fav and touch icons -->

</head>

<body>
<div class="container">
<!--TOp Nav-->
<div class="navbar navbar-inverse nav">
    <div class="navbar-inner">
        <div class="container">
            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>
            <a class="brand" href="/"><i class="icon-dashboard icon-1x"></i></a>
			
          	<div class="nav-collapse collapse">
              <ul class="nav">
                  <li class="divider-vertical"></li>
                  <li><a href="#"><i class="icon-home icon-white"></i> Home</a></li>
              </ul>
              <div class="pull-right">
                <ul class="nav pull-right">
                    <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Welcome, <?php echo $_SESSION['SESS_FIRST_NAME'] . " " . $_SESSION['SESS_LAST_NAME'];?> <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="/user/preferences"><i class="icon-cog"></i> Preferences</a></li>
                            <li><a href="/help/support"><i class="icon-envelope"></i> Contact Support</a></li>
                            <li class="divider"></li>
                            <li><a href="controller/logout.php"><i class="icon-off"></i> Logout</a></li>
                        </ul>
                    </li>
                </ul>
              </div>
            </div>
        </div>
    </div>
</div>

<script>
$(document).ready(function()
{
  //Handles menu drop down
  $('.dropdown-menu').find('form').click(function (e) {
        e.stopPropagation();
        });
  });
</script>

<!--/Top Nav-->
  <div class="row-fluid">
    
    <div class="span8">
	<!--Content-->

<h2>Dear, <span class="muted"><?php echo $_SESSION['SESS_FIRST_NAME'] . " " . $_SESSION['SESS_LAST_NAME'];?></span></h2>
<p>
Please use the following tabes to modify your basic profile info and security credintials.
</p>
<hr/>

<div id="tab" class="btn-group" data-toggle="buttons-radio">
<a href="#profile" class="btn btn-primary active" data-toggle="tab"><i class="icon-edit"></i>&nbsp;Profile</a>
<a href="#security" class="btn btn-primary" data-toggle="tab"><i class="icon-key"></i>&nbsp;Security</a>

</div>

<!--Tabs-->
<div class="tab-content">
		<!--Profile Tab-->
		<div class="tab-pane active" id="profile">
			<br/>
			<div class="alert alert-info">
			<p>Your basic profile settings are here, you can change your first and last names, also the email address, if you still haven't provided for any contact.</p>
			</div>
			
			<form class="form-horizontal" action='' method="POST">
			  <fieldset>
			    <div id="legend">
			      <legend class="">Modify Profile</legend>
			    </div>
			    <div class="control-group">
			      <!-- Username -->
			      <label class="control-label"  for="username">First Name</label>
			      <div class="controls">
			        <input type="text" value="<?php echo $_SESSION['SESS_FIRST_NAME'];?>" name="username" placeholder="Your First Name" class="input-xlarge">
			        <p class="help-block">Your First Name</p>
			      </div>
			    </div>
			
			    <div class="control-group">
			      <!-- E-mail -->
			      <label class="control-label" for="email">E-mail</label>
			      <div class="controls">
			        <input type="text" id="email" name="email" placeholder="Your valid email address" class="input-xlarge">
			        <p class="help-block">Please provide your E-mail</p>
			      </div>
			    </div>
			
			  <div class="control-group">
			      <!-- Username -->
			      <label class="control-label"  for="username">Last Name</label>
			      <div class="controls">
			        <input type="text" value="<?php echo $_SESSION['SESS_LAST_NAME'];?>" name="username" placeholder="Your Last Name" class="input-xlarge">
			        <p class="help-block">Your Last Name</p>
			      </div>
			    </div>
			
			
			    <div class="control-group">
			      <!-- Button -->
			      <div class="controls">
			        <button class="btn btn-warning">Modify</button>
			      </div>
			    </div>
			  </fieldset>
			</form>
		
		</div>
		<!--/Profile Tab-->
		
		<div class="tab-pane" id="security">
		<br/>
			<div class="alert alert-danger">
			<p>In order to change your password, you should know your current password.</p>
			</div>
			
		<form class="form-horizontal" action='' method="POST">
			  <fieldset>
			    <div id="legend">
			      <legend class="">Change Your Password</legend>
			    </div>
			    <div class="control-group">
			      <!-- Username -->
			      <label class="control-label"  for="username">Current Password</label>
			      <div class="controls">
			        <input type="text" name="cpass" placeholder="Enter your current password" class="input-xlarge">
			        <p class="help-block">Please provide your current password</p>
			      </div>
			    </div>
			
			    <div class="control-group">
			      <!-- E-mail -->
			      <label class="control-label" for="email">New Password</label>
			      <div class="controls">
			        <input type="password" id="email" name="pass" placeholder="New Password" class="input-xlarge">
			        <p class="help-block">Please provide a new password</p>
			      </div>
			    </div>
			
			  <div class="control-group">
			      <!-- Username -->
			      <label class="control-label"  for="username">Retype New Password</label>
			      <div class="controls">
			        <input type="password" name="rpass" placeholder="Retype Password" class="input-xlarge">
			        <p class="help-block">Re-enter your new password</p>
			      </div>
			    </div>
			
			
			    <div class="control-group">
			      <!-- Button -->
			      <div class="controls">
			        <button class="btn btn-danger">Change Password</button>
			      </div>
			    </div>
			  </fieldset>
			</form>
		
		</div>
	
</div>
<!--/Tabs-->
	<!--/Content-->
	
    </div>
	
	
	<div class="span4 well">
      <ul class="nav nav-list"> 
		  <li class="nav-header">Login Details</li>        
		  <li class="disabled"><a href="javascript:void"><i class="icon-signin"></i> Last Login:<?php echo date("F j, Y, g:i a");?></a></li>
          <li class="disabled"><a href="javascript:void"><i class="icon-user"></i> Your are logged in as:<?php echo "Data Entry";?></a></li>
		  <li class="divider"></li>
		   <li class="nav-header">User Panel</li> 
          
		  <li class="active"><a href="#"><i class="icon-cog"></i> Settings</a></li>
		  <li><a href="controller/logout.php"><i class="icon-off"></i> Logout</a></li>
		</ul>
    </div>
  </div>
  <hr/>
  <footer class="footer">
  &copy;2013 TMIS, TED, MoE
  </footer>
</div>

</body>

</html>